@extends('layouts.app')
@section('style')
<link rel="stylesheet" href="{{ asset('radio/css/jquery-labelauty.css') }}">
<style>
/*ul { list-style-type: none;}
li { display: inline-block;}
li { margin: 10px 0;}*/
input.labelauty + label { font: 12px "Microsoft Yahei";}
</style>
@endsection
@section('content')
<div class="container" style="margin:50px auto;overflow-x:hidden;">
    <div class="row">
        <div class="col-md-12" style="padding:0">
            <div class="panel panel-default mb01" style="border:0">
                <div class="panel-heading textIndent ">
                    <!-- <img src="{{ asset('images/index/account-05.png') }}" alt="" width="25px" class="mr01 "> -->
                    充值</div>
            
                 <div class="panel-body">
                    <form class="form-horizontal" role="form" method="GET" action="{{ url('smpay') }}">
                        {!! csrf_field() !!}

                       <!--  <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
                            <label class="col-md-4 col-xs-4 text-right">用户:</label>
                            <label class="col-md-6 col-xs-8 ">{{ $user->name }}</label> 
                        </div> 
                        <div class="form-group{{ $errors->has('balance') ? ' has-error' : '' }}">
                            <label class="col-md-4 col-xs-4 text-right">余额:</label>
                            <label class="col-md-6 col-xs-8">{{ $user->balance }} </label> 
                        </div>-->
                        <div class="form-group{{ $errors->has('money') ? ' has-error' : '' }}" style="line-height: 34px;">
                            <label class="add-on  col-md-4 col-xs-3 " style="padding-right:0">充值金额:</label>

                            <div class="col-md-6 col-xs-9" style="padding-left:0">
                                <input type="text" class="form-control" name="money" placeholder="请输入充值金额" style="width:100%">
                            </div>
                                @if ($errors->has('money'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('money') }}</strong>
                                    </span>
                                @endif
                        </div>
                        
                        <div class="form-group">
                            <label class="col-md-4  control-label col-xs-4" style="height: 36px;text-align:left;">充值方式:</label>
                           
                            <!-- <div class="col-md-12"> -->
                            <ul style="list-style-type: none;" class="dowebok col-xs-12">
                                <!-- <li style="display: inline-block;padding:0;" class="col-xs-12">
                                    <input type="radio" name="rechargetype" value="wx"  data-labelauty="微信充值" class="col-xs-12">
                                </li> -->
                                <li style="display: inline-block;padding:0;" class="col-xs-12">
                                    <input type="radio" name="rechargetype" value="xysmpay" checked data-labelauty="扫码充值" class="col-xs-12">
                                </li>
                                <!-- <li><input type="radio" name="rechargetype" value="gzzh" data-labelauty="中信扫码充值"></li> -->
                                <!-- <li><input type="radio" name="rechargetype" value="xysmpay" data-labelauty="扫码充值2"></li> -->
                                <!-- <li><input type="radio" name="rechargetype" value="yl" data-labelauty="银联充值"></li> -->
                                
                            </ul>
                            <!-- </div> -->
                            
                        </div>
                        <div class="form-group">
                            <div class="col-md-12 ">
                                <button type="button" onclick="submitYouFrom();" class="btn btn-primary btn-lg btn-block" style="height:35px;line-height:15px;background:#e62f17;border:0;">
                                    <!-- <i class="fa glyphicon glyphicon-send public-marginright10"></i> -->充值
                                </button>
                                <!-- <button type="button" onclick="submitYouFrom();" class="btn btn-primary btn-lg btn-block" style="height:35px;line-height:15px;background:#e62f17;border:0;">
                                  
                                </button> -->
                            </div>                            
                        </div>
                        <div class="form-group">
                            <div class="col-md-6 col-md-offset-4">
                                <div class="checkbox">
                                    <label>
                                        <i class="fa glyphicon glyphicon-hand-right public-marginright10"></i>每笔最少10元，最多20000元。
                                    </label>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
@section('js')
<!-- <script src="{{ asset('radio/js/jquery-1.8.3.min.js') }}"></script> -->
<script src="{{ asset('radio/js/jquery-labelauty.js') }}"></script>
<script>
$(function(){
    $(':input').labelauty();
});
</script>
<script type="text/javascript" language="javascript">
function submitYouFrom(){
 //var type = $('input[name="rechargetype"][checked]');
 var type = $('input:radio:checked').val();
 if(type=='wx'){
    var path="{{ url('weixinpay') }}";
 }
 if(type=='sm'){
    var path="{{ url('smpay') }}";
 }
 if(type=='gzzh'){
    var path="{{ url('gzzh') }}";
 }

 if(type=='xysmpay'){
    var path="{{ url('xysmpay') }}";
 }

 if(type=='yl'){
    var path="{{ url('ylpay') }}";
 }
 //var path="{{ url('smpay') }}";
 //alert(type);
 //alert(path);
 //$('form').action=path;
 $("form").attr("action", path);
 $('form').submit();
}
</script>
@endsection